<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680912617"><span id="local-6989586621680912618"></span></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Hs.Doc</span><span>
</span><span id="line-6"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier">HsDocString</span></a></span><span>
</span><span id="line-7"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#LHsDocString"><span class="hs-identifier">LHsDocString</span></a></span><span>
</span><span id="line-8"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#mkHsDocString"><span class="hs-identifier">mkHsDocString</span></a></span><span>
</span><span id="line-9"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#mkHsDocStringUtf8ByteString"><span class="hs-identifier">mkHsDocStringUtf8ByteString</span></a></span><span>
</span><span id="line-10"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#isEmptyDocString"><span class="hs-identifier">isEmptyDocString</span></a></span><span>
</span><span id="line-11"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#unpackHDS"><span class="hs-identifier">unpackHDS</span></a></span><span>
</span><span id="line-12"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#hsDocStringToByteString"><span class="hs-identifier">hsDocStringToByteString</span></a></span><span>
</span><span id="line-13"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ppr_mbDoc"><span class="hs-identifier">ppr_mbDoc</span></a></span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#appendDocs"><span class="hs-identifier">appendDocs</span></a></span><span>
</span><span id="line-16"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier">concatDocs</span></a></span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier">DeclDocMap</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#emptyDeclDocMap"><span class="hs-identifier">emptyDeclDocMap</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier">ArgDocMap</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#emptyArgDocMap"><span class="hs-identifier">emptyArgDocMap</span></a></span><span>
</span><span id="line-23"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Encoding.html"><span class="hs-identifier">GHC.Utils.Encoding</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.IO.Unsafe.html"><span class="hs-identifier">GHC.Utils.IO.Unsafe</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Char8.html#"><span class="hs-identifier">Data.ByteString.Char8</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">C8</span></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#"><span class="hs-identifier">Data.ByteString.Internal</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier">Map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-comment">-- | Haskell Documentation String</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- Internally this is a UTF8-Encoded 'ByteString'.</span><span>
</span><span id="line-49"></span><span class="hs-keyword">newtype</span><span> </span><span id="HsDocString"><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="HsDocString"><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span></span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-50"></span><span>  </span><span class="hs-comment">-- There are at least two plausible Semigroup instances for this type:</span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-52"></span><span>  </span><span class="hs-comment">-- 1. Simple string concatenation.</span><span>
</span><span id="line-53"></span><span>  </span><span class="hs-comment">-- 2. Concatenation as documentation paragraphs with newlines in between.</span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-55"></span><span>  </span><span class="hs-comment">-- To avoid confusion, we pass on defining an instance at all.</span><span>
</span><span id="line-56"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680912589"><span id="local-6989586621680912594"><span class="annot"><span class="annottext">HsDocString -&gt; HsDocString -&gt; Bool
(HsDocString -&gt; HsDocString -&gt; Bool)
-&gt; (HsDocString -&gt; HsDocString -&gt; Bool) -&gt; Eq HsDocString
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: HsDocString -&gt; HsDocString -&gt; Bool
$c/= :: HsDocString -&gt; HsDocString -&gt; Bool
== :: HsDocString -&gt; HsDocString -&gt; Bool
$c== :: HsDocString -&gt; HsDocString -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680912575"><span id="local-6989586621680912577"><span id="local-6989586621680912583"><span class="annot"><span class="annottext">Int -&gt; HsDocString -&gt; ShowS
[HsDocString] -&gt; ShowS
HsDocString -&gt; String
(Int -&gt; HsDocString -&gt; ShowS)
-&gt; (HsDocString -&gt; String)
-&gt; ([HsDocString] -&gt; ShowS)
-&gt; Show HsDocString
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [HsDocString] -&gt; ShowS
$cshowList :: [HsDocString] -&gt; ShowS
show :: HsDocString -&gt; String
$cshow :: HsDocString -&gt; String
showsPrec :: Int -&gt; HsDocString -&gt; ShowS
$cshowsPrec :: Int -&gt; HsDocString -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680912541"><span id="local-6989586621680912543"><span id="local-6989586621680912545"><span id="local-6989586621680912547"><span id="local-6989586621680912549"><span id="local-6989586621680912551"><span id="local-6989586621680912553"><span id="local-6989586621680912555"><span id="local-6989586621680912557"><span id="local-6989586621680912559"><span id="local-6989586621680912561"><span id="local-6989586621680912563"><span id="local-6989586621680912566"><span id="local-6989586621680912570"><span class="annot"><span class="annottext">Typeable HsDocString
Typeable HsDocString
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; HsDocString -&gt; c HsDocString)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsDocString)
-&gt; (HsDocString -&gt; Constr)
-&gt; (HsDocString -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsDocString))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c HsDocString))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; HsDocString -&gt; HsDocString)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString)
-&gt; Data HsDocString
HsDocString -&gt; DataType
HsDocString -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; HsDocString -&gt; HsDocString
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsDocString
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsDocString -&gt; c HsDocString
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsDocString)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c HsDocString)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsDocString -&gt; m HsDocString
gmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; u
$cgmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsDocString -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsDocString -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsDocString -&gt; HsDocString
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsDocString -&gt; HsDocString
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c HsDocString)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c HsDocString)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsDocString)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsDocString)
dataTypeOf :: HsDocString -&gt; DataType
$cdataTypeOf :: HsDocString -&gt; DataType
toConstr :: HsDocString -&gt; Constr
$ctoConstr :: HsDocString -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsDocString
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsDocString
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsDocString -&gt; c HsDocString
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsDocString -&gt; c HsDocString
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">-- | Located Haskell Documentation String</span><span>
</span><span id="line-59"></span><span class="hs-keyword">type</span><span> </span><span id="LHsDocString"><span class="annot"><a href="GHC.Hs.Doc.html#LHsDocString"><span class="hs-identifier hs-var">LHsDocString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912536"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-62"></span><span>  </span><span id="local-6989586621680912531"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; HsDocString -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680912529"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912529"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span id="local-6989586621680912528"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912528"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; ByteString -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912529"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912528"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-63"></span><span>  </span><span id="local-6989586621680912524"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO HsDocString
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680912522"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912522"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; HsDocString) -&gt; IO ByteString -&gt; IO HsDocString
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO ByteString
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912522"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912518"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>  </span><span id="local-6989586621680912516"><span class="annot"><span class="annottext">ppr :: HsDocString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; (HsDocString -&gt; SDoc) -&gt; HsDocString -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SDoc) -&gt; (HsDocString -&gt; String) -&gt; HsDocString -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocString -&gt; String
</span><a href="GHC.Hs.Doc.html#unpackHDS"><span class="hs-identifier hs-var">unpackHDS</span></a></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="annot"><a href="GHC.Hs.Doc.html#isEmptyDocString"><span class="hs-identifier hs-type">isEmptyDocString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-69"></span><span id="isEmptyDocString"><span class="annot"><span class="annottext">isEmptyDocString :: HsDocString -&gt; Bool
</span><a href="GHC.Hs.Doc.html#isEmptyDocString"><span class="hs-identifier hs-var hs-var">isEmptyDocString</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span id="local-6989586621680912511"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912511"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#null"><span class="hs-identifier hs-var">BS.null</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912511"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="annot"><a href="GHC.Hs.Doc.html#mkHsDocString"><span class="hs-identifier hs-type">mkHsDocString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-72"></span><span id="mkHsDocString"><span class="annot"><span class="annottext">mkHsDocString :: String -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#mkHsDocString"><span class="hs-identifier hs-var hs-var">mkHsDocString</span></a></span></span><span> </span><span id="local-6989586621680912509"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680912509"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-73"></span><span>  </span><span class="annot"><span class="annottext">IO HsDocString -&gt; HsDocString
forall a. IO a -&gt; a
</span><a href="GHC.Utils.IO.Unsafe.html#inlinePerformIO"><span class="hs-identifier hs-var">inlinePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO HsDocString -&gt; HsDocString) -&gt; IO HsDocString -&gt; HsDocString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680912507"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621680912507"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
</span><a href="GHC.Utils.Encoding.html#utf8EncodedLength"><span class="hs-identifier hs-var">utf8EncodedLength</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680912509"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span id="local-6989586621680912505"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621680912505"><span class="hs-identifier hs-var">buf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (ForeignPtr Word8)
forall a. Int -&gt; IO (ForeignPtr a)
</span><a href="../../base/src/GHC.ForeignPtr.html#mallocForeignPtrBytes"><span class="hs-identifier hs-var">mallocForeignPtrBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680912507"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; (Ptr Word8 -&gt; IO HsDocString) -&gt; IO HsDocString
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/GHC.ForeignPtr.html#withForeignPtr"><span class="hs-identifier hs-var">withForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621680912505"><span class="hs-identifier hs-var">buf</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Word8 -&gt; IO HsDocString) -&gt; IO HsDocString)
-&gt; (Ptr Word8 -&gt; IO HsDocString) -&gt; IO HsDocString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680912502"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621680912502"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-77"></span><span>      </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; String -&gt; IO ()
</span><a href="GHC.Utils.Encoding.html#utf8EncodeString"><span class="hs-identifier hs-var">utf8EncodeString</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621680912502"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680912509"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-78"></span><span>      </span><span class="annot"><span class="annottext">HsDocString -&gt; IO HsDocString
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; Int -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Internal.html#fromForeignPtr"><span class="hs-identifier hs-var">BS.fromForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621680912505"><span class="hs-identifier hs-var">buf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680912507"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- | Create a 'HsDocString' from a UTF8-encoded 'ByteString'.</span><span>
</span><span id="line-81"></span><span class="annot"><a href="GHC.Hs.Doc.html#mkHsDocStringUtf8ByteString"><span class="hs-identifier hs-type">mkHsDocStringUtf8ByteString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-82"></span><span id="mkHsDocStringUtf8ByteString"><span class="annot"><span class="annottext">mkHsDocStringUtf8ByteString :: ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#mkHsDocStringUtf8ByteString"><span class="hs-identifier hs-var hs-var">mkHsDocStringUtf8ByteString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="annot"><a href="GHC.Hs.Doc.html#unpackHDS"><span class="hs-identifier hs-type">unpackHDS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-85"></span><span id="unpackHDS"><span class="annot"><span class="annottext">unpackHDS :: HsDocString -&gt; String
</span><a href="GHC.Hs.Doc.html#unpackHDS"><span class="hs-identifier hs-var hs-var">unpackHDS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; String
</span><a href="GHC.Utils.Encoding.html#utf8DecodeByteString"><span class="hs-identifier hs-var">utf8DecodeByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; String)
-&gt; (HsDocString -&gt; ByteString) -&gt; HsDocString -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocString -&gt; ByteString
</span><a href="GHC.Hs.Doc.html#hsDocStringToByteString"><span class="hs-identifier hs-var">hsDocStringToByteString</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- | Return the contents of a 'HsDocString' as a UTF8-encoded 'ByteString'.</span><span>
</span><span id="line-88"></span><span class="annot"><a href="GHC.Hs.Doc.html#hsDocStringToByteString"><span class="hs-identifier hs-type">hsDocStringToByteString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-89"></span><span id="hsDocStringToByteString"><span class="annot"><span class="annottext">hsDocStringToByteString :: HsDocString -&gt; ByteString
</span><a href="GHC.Hs.Doc.html#hsDocStringToByteString"><span class="hs-identifier hs-var hs-var">hsDocStringToByteString</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span id="local-6989586621680912498"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912498"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912498"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="annot"><a href="GHC.Hs.Doc.html#ppr_mbDoc"><span class="hs-identifier hs-type">ppr_mbDoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#LHsDocString"><span class="hs-identifier hs-type">LHsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-92"></span><span id="ppr_mbDoc"><span class="annot"><span class="annottext">ppr_mbDoc :: Maybe LHsDocString -&gt; SDoc
</span><a href="GHC.Hs.Doc.html#ppr_mbDoc"><span class="hs-identifier hs-var hs-var">ppr_mbDoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680912497"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680912497"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680912497"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHC.Hs.Doc.html#ppr_mbDoc"><span class="hs-identifier hs-var">ppr_mbDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- | Join two docstrings.</span><span>
</span><span id="line-96"></span><span class="hs-comment">--</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- Non-empty docstrings are joined with two newlines in between,</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- resulting in separate paragraphs.</span><span>
</span><span id="line-99"></span><span class="annot"><a href="GHC.Hs.Doc.html#appendDocs"><span class="hs-identifier hs-type">appendDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-100"></span><span id="appendDocs"><span class="annot"><span class="annottext">appendDocs :: HsDocString -&gt; HsDocString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#appendDocs"><span class="hs-identifier hs-var hs-var">appendDocs</span></a></span></span><span> </span><span id="local-6989586621680912495"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680912495"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621680912494"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680912494"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-101"></span><span>  </span><span class="annot"><span class="annottext">HsDocString -&gt; Maybe HsDocString -&gt; HsDocString
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span>
</span><span id="line-102"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.html#empty"><span class="hs-identifier hs-var">BS.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[HsDocString] -&gt; Maybe HsDocString
</span><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier hs-var">concatDocs</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680912495"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680912494"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | Concat docstrings with two newlines in between.</span><span>
</span><span id="line-106"></span><span class="hs-comment">--</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- Empty docstrings are skipped.</span><span>
</span><span id="line-108"></span><span class="hs-comment">--</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- If all inputs are empty, 'Nothing' is returned.</span><span>
</span><span id="line-110"></span><span class="annot"><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier hs-type">concatDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-111"></span><span id="concatDocs"><span class="annot"><span class="annottext">concatDocs :: [HsDocString] -&gt; Maybe HsDocString
</span><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier hs-var hs-var">concatDocs</span></a></span></span><span> </span><span id="local-6989586621680912491"><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680912491"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#null"><span class="hs-identifier hs-var">BS.null</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912490"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-113"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-114"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">HsDocString -&gt; Maybe HsDocString
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-var">HsDocString</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621680912490"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-116"></span><span>    </span><span id="local-6989586621680912490"><span class="annot"><span class="annottext">b :: ByteString
</span><a href="#local-6989586621680912490"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString] -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.html#intercalate"><span class="hs-identifier hs-var">BS.intercalate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Char8.html#pack"><span class="hs-identifier hs-var">C8.pack</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n\n&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span>      </span><span class="annot"><span class="annottext">([ByteString] -&gt; ByteString)
-&gt; ([HsDocString] -&gt; [ByteString]) -&gt; [HsDocString] -&gt; ByteString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; Bool) -&gt; [ByteString] -&gt; [ByteString]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (ByteString -&gt; Bool) -&gt; ByteString -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#null"><span class="hs-identifier hs-var">BS.null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>      </span><span class="annot"><span class="annottext">([ByteString] -&gt; [ByteString])
-&gt; ([HsDocString] -&gt; [ByteString]) -&gt; [HsDocString] -&gt; [ByteString]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(HsDocString -&gt; ByteString) -&gt; [HsDocString] -&gt; [ByteString]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocString -&gt; ByteString
</span><a href="GHC.Hs.Doc.html#hsDocStringToByteString"><span class="hs-identifier hs-var">hsDocStringToByteString</span></a></span><span>
</span><span id="line-119"></span><span>      </span><span class="annot"><span class="annottext">([HsDocString] -&gt; ByteString) -&gt; [HsDocString] -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680912491"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-comment">-- | Docs for declarations: functions, data types, instances, methods etc.</span><span>
</span><span id="line-122"></span><span class="hs-keyword">newtype</span><span> </span><span id="DeclDocMap"><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DeclDocMap"><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912483"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-125"></span><span>  </span><span id="local-6989586621680912474"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; DeclDocMap -&gt; IO ()
</span><a href="#local-6989586621680912474"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680912473"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912473"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span> </span><span id="local-6989586621680912472"><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680912472"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [(Name, HsDocString)] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912473"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; [(Name, HsDocString)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680912472"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-comment">-- We can't rely on a deterministic ordering of the `Name`s here.</span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-comment">-- See the comments on `Name`'s `Ord` instance for context.</span><span>
</span><span id="line-128"></span><span>  </span><span id="local-6989586621680912463"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO DeclDocMap
</span><a href="#local-6989586621680912463"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680912462"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912462"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; DeclDocMap
</span><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">(Map Name HsDocString -&gt; DeclDocMap)
-&gt; ([(Name, HsDocString)] -&gt; Map Name HsDocString)
-&gt; [(Name, HsDocString)]
-&gt; DeclDocMap
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, HsDocString)] -&gt; Map Name HsDocString
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(Name, HsDocString)] -&gt; DeclDocMap)
-&gt; IO [(Name, HsDocString)] -&gt; IO DeclDocMap
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO [(Name, HsDocString)]
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912462"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912458"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-131"></span><span>  </span><span id="local-6989586621680912454"><span class="annot"><span class="annottext">ppr :: DeclDocMap -&gt; SDoc
</span><a href="#local-6989586621680912454"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span> </span><span id="local-6989586621680912453"><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680912453"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Name, HsDocString) -&gt; SDoc) -&gt; [(Name, HsDocString)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Name, HsDocString) -&gt; SDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; (a, a) -&gt; SDoc
</span><a href="#local-6989586621680912451"><span class="hs-identifier hs-var">pprPair</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; [(Name, HsDocString)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toAscList"><span class="hs-identifier hs-var">Map.toAscList</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680912453"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-133"></span><span>      </span><span id="local-6989586621680912451"><span class="annot"><span class="annottext">pprPair :: (a, a) -&gt; SDoc
</span><a href="#local-6989586621680912451"><span class="hs-identifier hs-var hs-var">pprPair</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680912445"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912445"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680912444"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912444"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912445"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">Outputable.&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912444"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="annot"><a href="GHC.Hs.Doc.html#emptyDeclDocMap"><span class="hs-identifier hs-type">emptyDeclDocMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span>
</span><span id="line-136"></span><span id="emptyDeclDocMap"><span class="annot"><span class="annottext">emptyDeclDocMap :: DeclDocMap
</span><a href="GHC.Hs.Doc.html#emptyDeclDocMap"><span class="hs-identifier hs-var hs-var">emptyDeclDocMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; DeclDocMap
</span><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Docs for arguments. E.g. function arguments, method arguments.</span><span>
</span><span id="line-139"></span><span class="hs-keyword">newtype</span><span> </span><span id="ArgDocMap"><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-var">ArgDocMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ArgDocMap"><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-var">ArgDocMap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912435"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-142"></span><span>  </span><span id="local-6989586621680912423"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; ArgDocMap -&gt; IO ()
</span><a href="#local-6989586621680912423"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680912422"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912422"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span><span> </span><span id="local-6989586621680912421"><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680912421"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; [(Name, [(Int, HsDocString)])] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912422"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Name [(Int, HsDocString)] -&gt; [(Name, [(Int, HsDocString)])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Int HsDocString -&gt; [(Int, HsDocString)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toAscList"><span class="hs-identifier hs-var">Map.toAscList</span></a></span><span> </span><span class="annot"><span class="annottext">(Map Int HsDocString -&gt; [(Int, HsDocString)])
-&gt; Map Name (Map Int HsDocString) -&gt; Map Name [(Int, HsDocString)]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680912421"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-comment">-- We can't rely on a deterministic ordering of the `Name`s here.</span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-comment">-- See the comments on `Name`'s `Ord` instance for context.</span><span>
</span><span id="line-145"></span><span>  </span><span id="local-6989586621680912410"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO ArgDocMap
</span><a href="#local-6989586621680912410"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680912409"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912409"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString) -&gt; ArgDocMap
</span><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-var">ArgDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">(Map Name (Map Int HsDocString) -&gt; ArgDocMap)
-&gt; ([(Name, [(Int, HsDocString)])]
    -&gt; Map Name (Map Int HsDocString))
-&gt; [(Name, [(Int, HsDocString)])]
-&gt; ArgDocMap
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([(Int, HsDocString)] -&gt; Map Int HsDocString)
-&gt; Map Name [(Int, HsDocString)] -&gt; Map Name (Map Int HsDocString)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">[(Int, HsDocString)] -&gt; Map Int HsDocString
forall k a. [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromDistinctAscList"><span class="hs-identifier hs-var">Map.fromDistinctAscList</span></a></span><span> </span><span class="annot"><span class="annottext">(Map Name [(Int, HsDocString)] -&gt; Map Name (Map Int HsDocString))
-&gt; ([(Name, [(Int, HsDocString)])]
    -&gt; Map Name [(Int, HsDocString)])
-&gt; [(Name, [(Int, HsDocString)])]
-&gt; Map Name (Map Int HsDocString)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, [(Int, HsDocString)])] -&gt; Map Name [(Int, HsDocString)]
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(Name, [(Int, HsDocString)])] -&gt; ArgDocMap)
-&gt; IO [(Name, [(Int, HsDocString)])] -&gt; IO ArgDocMap
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO [(Name, [(Int, HsDocString)])]
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680912409"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680912405"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-148"></span><span>  </span><span id="local-6989586621680912400"><span class="annot"><span class="annottext">ppr :: ArgDocMap -&gt; SDoc
</span><a href="#local-6989586621680912400"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span><span> </span><span id="local-6989586621680912399"><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680912399"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Name, Map Int HsDocString) -&gt; SDoc)
-&gt; [(Name, Map Int HsDocString)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Name, Map Int HsDocString) -&gt; SDoc
forall {a} {a} {a}.
(Outputable a, Outputable a, Outputable a) =&gt;
(a, Map a a) -&gt; SDoc
</span><a href="#local-6989586621680912398"><span class="hs-identifier hs-var">pprPair</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString) -&gt; [(Name, Map Int HsDocString)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toAscList"><span class="hs-identifier hs-var">Map.toAscList</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680912399"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-150"></span><span>      </span><span id="local-6989586621680912398"><span class="annot"><span class="annottext">pprPair :: (a, Map a a) -&gt; SDoc
</span><a href="#local-6989586621680912398"><span class="hs-identifier hs-var hs-var">pprPair</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680912391"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912391"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680912390"><span class="annot"><span class="annottext">Map a a
</span><a href="#local-6989586621680912390"><span class="hs-identifier hs-var">int_map</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-151"></span><span>        </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912391"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">Outputable.&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map a a -&gt; SDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; Map a a -&gt; SDoc
</span><a href="#local-6989586621680912389"><span class="hs-identifier hs-var">pprIntMap</span></a></span><span> </span><span class="annot"><span class="annottext">Map a a
</span><a href="#local-6989586621680912390"><span class="hs-identifier hs-var">int_map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>      </span><span id="local-6989586621680912389"><span class="annot"><span class="annottext">pprIntMap :: Map a a -&gt; SDoc
</span><a href="#local-6989586621680912389"><span class="hs-identifier hs-var hs-var">pprIntMap</span></a></span></span><span> </span><span id="local-6989586621680912384"><span class="annot"><span class="annottext">Map a a
</span><a href="#local-6989586621680912384"><span class="hs-identifier hs-var">im</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((a, a) -&gt; SDoc) -&gt; [(a, a)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(a, a) -&gt; SDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; (a, a) -&gt; SDoc
</span><a href="#local-6989586621680912383"><span class="hs-identifier hs-var">pprIPair</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map a a -&gt; [(a, a)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toAscList"><span class="hs-identifier hs-var">Map.toAscList</span></a></span><span> </span><span class="annot"><span class="annottext">Map a a
</span><a href="#local-6989586621680912384"><span class="hs-identifier hs-var">im</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>      </span><span id="local-6989586621680912383"><span class="annot"><span class="annottext">pprIPair :: (a, a) -&gt; SDoc
</span><a href="#local-6989586621680912383"><span class="hs-identifier hs-var hs-var">pprIPair</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680912378"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912378"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680912377"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912377"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912378"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">Outputable.&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680912377"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="annot"><a href="GHC.Hs.Doc.html#emptyArgDocMap"><span class="hs-identifier hs-type">emptyArgDocMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span><span>
</span><span id="line-156"></span><span id="emptyArgDocMap"><span class="annot"><span class="annottext">emptyArgDocMap :: ArgDocMap
</span><a href="GHC.Hs.Doc.html#emptyArgDocMap"><span class="hs-identifier hs-var hs-var">emptyArgDocMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString) -&gt; ArgDocMap
</span><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-var">ArgDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span>
</span><span id="line-157"></span></pre></body></html>